﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// wxgm_devPack数据模型对象
    /// </summary>
    [Serializable]
    public partial class wxgm_devPackMod
    {
        /// <summary>
        /// 初始化wxgm_devPack数据模型对象
        /// </summary>
        public wxgm_devPackMod()
        {
            
        }
        /// <summary>
        /// 初始化wxgm_devPack数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="id">Id</param>
        /// <param name="caption">caption</param>
        /// <param name="packno">Packno</param>
        /// <param name="cTime">CTime</param>
        public wxgm_devPackMod(long id,string caption,string packno,DateTime cTime)
        {
            //给Id字段赋值
            this.Id = id;
            //给caption字段赋值
            this.Caption = caption;
            //给Packno字段赋值
            this.Packno = packno;
            //给CTime字段赋值
            this.CTime = cTime;
        }
        /// <summary>
        /// 初始化wxgm_devPack数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="id">Id</param>
        /// <param name="caption">caption</param>
        /// <param name="packno">Packno</param>
        /// <param name="cTime">CTime</param>
        /// <param name="userid">userid</param>
        public wxgm_devPackMod(long id,string caption,string packno,DateTime cTime,string userid)
        {
            //给Id字段赋值
            this.Id = id;
            //给caption字段赋值
            this.Caption = caption;
            //给Packno字段赋值
            this.Packno = packno;
            //给CTime字段赋值
            this.CTime = cTime;
            //给userid字段赋值
            this.Userid = userid;
        }
        
		//属性存储数据的变量
        private long _id;
        private string _caption;
        private string _packno;
        private DateTime _cTime;
        private string _userid;
        
        /// <summary>
        /// Id
        /// </summary>
        public long Id
        {
            get { return this._id; }
            set { this._id = value; }
        }
        /// <summary>
        /// caption
        /// </summary>
        public string Caption
        {
            get { return this._caption; }
            set { this._caption = value; }
        }
        /// <summary>
        /// Packno
        /// </summary>
        public string Packno
        {
            get { return this._packno; }
            set { this._packno = value; }
        }
        /// <summary>
        /// CTime
        /// </summary>
        public DateTime CTime
        {
            get { return this._cTime; }
            set { this._cTime = value; }
        }
        /// <summary>
        /// userid
        /// </summary>
        public string Userid
        {
            get { return this._userid; }
            set { this._userid = value; }
        }
        
        /// <summary>
        /// 对比两个wxgm_devPack数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的wxgm_devPack数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成wxgm_devPack数据模型对象
            wxgm_devPackMod wxgm_devPackMod = obj as wxgm_devPackMod;
            //判断是否转换成功
            if (wxgm_devPackMod == null) return false;
            //进行匹配属性的值
            return
                //判断Id是否一致
                this.Id == wxgm_devPackMod.Id &&
                //判断caption是否一致
                this.Caption == wxgm_devPackMod.Caption &&
                //判断Packno是否一致
                this.Packno == wxgm_devPackMod.Packno &&
                //判断CTime是否一致
                this.CTime == wxgm_devPackMod.CTime &&
                //判断userid是否一致
                this.Userid == wxgm_devPackMod.Userid;
        }
        /// <summary>
        /// 将当前wxgm_devPack数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将wxgm_devPack数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将Id进行按位异或运算处理
                this.Id.GetHashCode() ^
                //将caption进行按位异或运算处理
                (this.Caption == null ? 2147483647 : this.Caption.GetHashCode()) ^
                //将Packno进行按位异或运算处理
                (this.Packno == null ? 2147483647 : this.Packno.GetHashCode()) ^
                //将CTime进行按位异或运算处理
                this.CTime.GetHashCode() ^
                //将userid进行按位异或运算处理
                (this.Userid == null ? 2147483647 : this.Userid.GetHashCode());
        }
        /// <summary>
        /// 将当前wxgm_devPack数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前wxgm_devPack数据模型对象转换成字符串副本
            return
                "[" +
                //将Id转换成字符串
                this.Id + "," +
                //将caption转换成字符串
                this.Caption + "," +
                //将Packno转换成字符串
                this.Packno + "," +
                //将CTime转换成字符串
                this.CTime +
                "]";
        }
    }
}
